home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8450 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: very simple newbie qu
  5. Date: 4 Mar 1996 09:19:56 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4hecjs$p7m@gail.ripco.com>
  8. NNTP-Posting-Host: foley.ripco.com
  9.  
  10. Norman Bullen <nbullen@ix.netcom.com> in <3135B987.1DDE@ix.netcom.com>
  11. wrote of Tanmoy's clearly written and correct exposition of the problem
  12. with:
  13.  
  14. >> scanf("%s/n",s);
  15.  
  16. >What he's trying to say (but doesn't seem to express very well) is that
  17. >the representation of a "newline" character should have a backward
  18. slash
  19. >(the top end pointed left) instead of a forward slash.
  20.  
  21. This is hardly all Tanmoy succeeded in expressing well.  Go back and
  22. reread his article.
  23.  
  24. >That's not the real problem, however. scanf is a really poorly conceived
  25. >function, IMHO. It rules are too complicated and it does not do what most
  26. >people want it to do. For your situation, as shown in the sample code
  27. >above, you want to use gets instead of scanf.
  28.  
  29. Please, get the FAQ from rtfm.mit.edu immediately.  If you had already
  30. done this -- as you _should_ have -- you would know better than to post
  31. such a "really poorly conceived" suggestion.
  32.                                                                                                        
  33. --
  34. * Martin Ambuhl       net: mambuhl@ripco.com
  35. * Chicago, IL (USA)    
  36.